<?php
/**
 * TomatoCMS
 *
 * LICENSE
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-2.0.txt
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@tomatocms.com so we can send you a copy immediately.
 *
 * @copyright    Copyright (c) 2009-2010 TIG Corporation (http://www.tig.vn)
 * @license        http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE Version 2
 * @version     $Id: ArticleIcons.php 3060 2010-05-26 07:56:08Z huuphuoc $
 * @since        2.0.3
 */

/**
 * This helper show items in cart
 */
class B2b_View_Helper_LanguageLink extends Zend_View_Helper_Abstract
{
    public function languageLink()
    {
        $request = Zend_Controller_Front::getInstance()->getRequest();
        $lang = $request->getParam('lang');
        $this->view->assign('lang', $lang);

        $url = $this->view->serverUrl().$_SERVER['REQUEST_URI'];
        $this->view->assign('url', $url);
        /*echo '<pre>';
        print_r($request);
        echo '</pre>';
        die;*/

        /**
        * Get connection to database
        **/
        $conn = Tomato_Db_Connection::factory()->getMasterConnection();

        $this->view->addScriptPath(TOMATO_APP_DIR . DS . 'modules' . DS . 'b2b' . DS . 'views' . DS . 'scripts');
        return $this->view->render('_partial/_languageLink.phtml');
    }
}
